$(document).ready(function() {
    homePage.init();

});
var _mmg = null;
var editIndex = undefined;

var homePage = function(){
    return{
        init: function () {
            _mmg = $('#dg').datagrid({
                url: '/homePage',
                params: $("#dbDetailForm").serialize(),
                method: 'post',
                fitColumns: true,
                pageList: [25, 30, 35],
                idField: 'id', //主键
                onClickRow: 'onClickRow',
                columns:[[
                    {field:'Id',title:'ID',width:50},
                    {field:'Name',title:'分组名',width:100,align:'center',editor:'text'},
                    {field:'Title',title:'显示名',width:100,align:'center',editor:'text'},
                    {field:'Sort',title:'排序',width:50,align:'center',editor:'numberbox'},
                    {field:'Status',title:'状态',width:50,align:'center',editor:'numberbox'},
                ]],

            }).datagrid("clientPaging");
        },

    }

}
();

